package com.hms.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

@Entity
@Table(name = "td_customerContact")
public class TdCustomerContact extends BaseEntity {

	private static final long serialVersionUID = 1L;

	// 联系人类别
	public enum ContactType {
		Business;
	}

	// 在职状态
	public enum JobsStatus {
		Work, Leave;
	}

	private String zhName;

	private String enName;

	private String departmentName;

	private String jobs;

	private String telephone;

	private String mobile;

	private String companyEmail;

	private String privateEmail;

	private ContactType contactType;

	private JobsStatus jobsStatus;

	private String authorized;

	private String remark;

	private TdCustomer customer;

	/**
	 * 中文名
	 * 
	 * @return
	 */
	@Column(name = "zhName")
	public String getZhName() {
		return zhName;
	}

	public void setZhName(String zhName) {
		this.zhName = zhName;
	}

	/**
	 * 英文名
	 * 
	 * @return
	 */
	@Column(name = "enName")
	public String getEnName() {
		return enName;
	}

	public void setEnName(String enName) {
		this.enName = enName;
	}

	/**
	 * 所属部门
	 * 
	 * @return
	 */
	@Column(name = "departmentName", nullable = false)
	public String getDepartmentName() {
		return departmentName;
	}

	public void setDepartmentName(String departmentName) {
		this.departmentName = departmentName;
	}

	/**
	 * 所在职位
	 * 
	 * @return
	 */
	@Column(name = "jobs")
	public String getJobs() {
		return jobs;
	}

	public void setJobs(String jobs) {
		this.jobs = jobs;
	}

	/**
	 * 办公电话
	 * 
	 * @return
	 */
	@Column(name = "telephone")
	public String getTelephone() {
		return telephone;
	}

	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}

	/**
	 * 手机
	 * 
	 * @return
	 */
	@Column(name = "mobile")
	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	/**
	 * 公司邮箱
	 * 
	 * @return
	 */
	@Column(name = "companyEmail", nullable = false)
	public String getCompanyEmail() {
		return companyEmail;
	}

	public void setCompanyEmail(String companyEmail) {
		this.companyEmail = companyEmail;
	}

	/**
	 * 私人邮箱
	 * 
	 * @return
	 */
	@Column(name = "privateEmail")
	public String getPrivateEmail() {
		return privateEmail;
	}

	public void setPrivateEmail(String privateEmail) {
		this.privateEmail = privateEmail;
	}

	/**
	 * 联系人类别
	 * 
	 * @return
	 */
	@Enumerated
	@Column(name = "contactType")
	public ContactType getContactType() {
		return contactType;
	}

	public void setContactType(ContactType contactType) {
		this.contactType = contactType;
	}

	/**
	 * 在职状态
	 * 
	 * @return
	 */
	@Enumerated
	@Column(name = "jobsStatus", nullable = false)
	public JobsStatus getJobsStatus() {
		return jobsStatus;
	}

	public void setJobsStatus(JobsStatus jobsStatus) {
		this.jobsStatus = jobsStatus;
	}

	/**
	 * 查看权限
	 * 
	 * @return
	 */
	public String getAuthorized() {
		return authorized;
	}

	public void setAuthorized(String authorized) {
		this.authorized = authorized;
	}

	/**
	 * 备注
	 * 
	 * @return
	 */
	@Column(name = "remark")
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	/**
	 * 所属客户
	 * 
	 * @return
	 */
	@OneToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "customerId", nullable = false)
	public TdCustomer getCustomer() {
		return customer;
	}

	public void setCustomer(TdCustomer customer) {
		this.customer = customer;
	}
}
